package ${package}<#if moduleName??>.${moduleName}</#if>.entity<#if subModuleName??>.${subModuleName}</#if>;

import io.swagger.annotations.*;
import com.baomidou.mybatisplus.annotation.*;
import com.xisoft.core.product.entity.ZSuperEntityVo;
import lombok.*;

/**
 * Automatic generated：${tableComments}Entity
 *
 * @author 作者：👨🏻${author} 📧${email} ☎13121055201
 * @description 类描述：${tableComments}
 * @create 创建时间：${date}
 * @update 修改时间：${date}
 * @since ${version} ${date}
 */
@Data
@EqualsAndHashCode (callSuper = false)
@TableName (value = "${tableName}")
@ApiModel (description = "${tableName?lower_case} ${tableComments}")
public class ${className}Entity extends ZSuperEntityVo
{
    public static long serialVersionUID = 1L;

    public ${className}Entity()
    {
    <#if struct??>
        <#list struct as str>
${str}
        </#list>
    </#if>

    <#if childTables??>
        <#list childTables as child>
            childEntity.put(${child}VO.TABLE_NAME,${child}Entity.class.getName());
            childInfo.put(${child}VO.TABLE_NAME, null);
        </#list>
    </#if>
    }
<#list columnList as column>
    <#if baseClassEntity?? && baseClassEntity.fields?split(",")?seq_contains(column.columnName)>
    <#else>

    /** description：${column.attrName?lower_case} ${column.comment} */
    <#if column.isPK>
    @TableId
    </#if>
    @TableField (value = "${column.attrName?lower_case}")
    @ApiModelProperty (value = "${column.attrName}： ${column.comment}")
    private ${column.attrType} ${column.attrName?lower_case};
    </#if>
</#list>

<#list columnList as column>
     <#if column.isPK>
     /** description： 表主鍵*/
     public static String PRIMARY_KEY = "${column.attrName?lower_case}";

     /** description： 获取表主鍵*/
     public static String getPrimaryKey( ) { return PRIMARY_KEY; }
     </#if>
</#list>

    /************************************************************* <br>
    *
    *说明: 获取表名 <br>
    *
    * @Description   <br>
    * @Date Created on ${date}  <br>
    * @return java.lang.String  <br>
    * @author libc
    * @version 1.0 <br>
    ************************************************************* <br>
    */
    public static String getTableName( ) { return TABLE_NAME; }

    /** description ${tableComments}*/
    public final static String TABLE_NAME = "${tableName?lower_case}";

<#if setRef??>
    <#list setRef as ref>
${ref}
    </#list>
</#if>
}